package com.songlanyun.modules.coupon.dao;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.songlanyun.modules.coupon.entity.CouponReceiveRecordEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.songlanyun.modules.coupon.model.dto.CouponReceivePageReq;
import com.songlanyun.modules.coupon.model.vo.CouponEntityVo;
import com.songlanyun.modules.coupon.model.vo.CouponReceiveRecordVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;
import java.util.Map;

/**
 * 优惠券领取记录与使用情况
 *
 * @author lubo
 * @email sunlightcs@gmail.com
 * @date 2022-07-05 15:20:02
 */
@Mapper
public interface CouponReceiveRecordDao extends BaseMapper<CouponReceiveRecordEntity> {

    IPage<CouponReceiveRecordVo> queryCouponPage(IPage<CouponReceiveRecordVo> page,@Param("req") CouponReceivePageReq params);

    List<CouponReceiveRecordVo> loadMyShopCoupons(@Param("userId") Long userId, @Param("shopId")Long shopId);

    List<CouponReceiveRecordVo> loadMyPlatCoupons(@Param("userId") Long userId);

    CouponReceiveRecordVo loadByCouponSlimEntity(@Param("myCouponId") Long myCouponId);
}
